﻿using UnityEngine;
using System.Collections;

public class RotateScript : MonoBehaviour {

	public GameObject target;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		transform.LookAt(target.GetComponent<ExpandScript>().puzzleCenter);
		Vector3 input = new Vector3 (Input.GetAxis ("Horizontal"), Input.GetAxis ("Vertical"), 0);
		if (input != Vector3.zero) {
			transform.Translate(input*1.5f);
		}
	}
}
